package com.iscale.service;

import com.iscale.model.entity.BaseNeedsInfo;
import com.baomidou.mybatisplus.service.IService;
import com.iscale.util.Result;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 需求类别 服务类
 * </p>
 *
 * @author Andychen
 * @since 2017-03-10
 */
public interface BaseNeedsInfoService extends IService<BaseNeedsInfo> {

    /**
     * 保存品类信息
     * @param file
     * @param needsInfo
     * @return
     */
    public Result saveNeeds(MultipartFile file,BaseNeedsInfo needsInfo) throws IOException;

    /**
     * 检查品类名字是否存在
     * @param name
     * @return
     */
    public boolean checkNeedsByName(String name);

    /**
     * 更新品类信息
     * @param file
     * @param needsInfo
     * @return
     */
    public Result updateNeeds(MultipartFile file,BaseNeedsInfo needsInfo) throws IOException;

    /**
     * 查找 大品类
     * @return
     * @throws IOException
     */
    public List<BaseNeedsInfo> selectBigNeeds() throws IOException;
}
